<form id="add-form" class="form-horizontal form-ajax" role="form" data-toggle="validator" method="POST" action="">
    {:token()}
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Group')}:</label>
        <div class="col-xs-12 col-sm-8">
            {if $ids}
                {:build_select('group[]', $groupdata, $groupids, ['class'=>'form-control selectpicker', 'multiple'=>'','disabled'=>'true','data-rule'=>'required'])}
            <input type="hidden" class="form-control"  name="row[s_id]" value="{$ids}" />
            <input type="hidden" class="form-control"  name="row[type]" value="{$type}" />
            {else/}
                {:build_select('group[]', $groupdata, null, ['class'=>'form-control selectpicker', 'multiple'=>'', 'data-rule'=>'required'])}
            {/if}
        </div>
    </div>
    <div class="form-group">
        <label for="username" class="control-label col-xs-12 col-sm-2">{:__('Username')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" class="form-control" id="username" placeholder="手机号" name="row[username]" value="{if $ids}{$s_name}{/if}" data-rule="required;username" />
        </div>
    </div>
    <div class="form-group">
        <label for="email" class="control-label col-xs-12 col-sm-2">{:__('Email')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="email" class="form-control" id="email" name="row[email]" value="" data-rule="email" />
        </div>
    </div>
    <div class="form-group">
        <label for="nickname" class="control-label col-xs-12 col-sm-2">{:__('Nickname')}:</label>
        <div class="col-xs-12 col-sm-8">
            {if $ids}
                <input type="text" class="form-control" id="nickname" name="row[nickname]" autocomplete="off" value="{$s_name}" readonly data-rule="required" />
            {else/}
                <input type="text" class="form-control" id="nickname" name="row[nickname]" autocomplete="off" value="" data-rule="required" />
            {/if}
        </div>
    </div>
    <div class="form-group">
        <label for="password" class="control-label col-xs-12 col-sm-2">{:__('Password')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="password" class="form-control" id="password" name="row[password]" autocomplete="new-password" value="" data-rule="required;password" />
        </div>
    </div>

<!--    <div class="form-group">-->
<!--        <label class="control-label col-xs-12 col-sm-2">省份:</label>-->
<!--        <div class="col-xs-12 col-sm-8">-->
<!--            {foreach name="pro" item="vo"}-->
<!--            <div class="checkbox checkbox-inline">-->
<!--                <label for="row[province][]-{$vo.id}"><input id="row[province][]-{$vo.id}" name="row[province][]" type="checkbox" value="{$vo.id}"/> {$vo.name}</label>-->
<!--            </div>-->
<!--            {/foreach}-->
<!--        </div>-->
<!--    </div>-->

    <!--<div class="form-group">-->
        <!--<label class="control-label col-xs-12 col-sm-2">类型:</label>-->
        <!--<div class="col-xs-12 col-sm-8">-->
            <!--{:build_radios('row[type]', ['0'=>__('内部员工'), '1'=>__('院校账号'), '3'=>__('兼职人员')])}-->
        <!--</div>-->
    <!--</div>-->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[status]', ['normal'=>__('Normal'), 'hidden'=>__('Hidden')])}
        </div>
    </div>
    <div class="form-group hidden layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>